<%@page contentType="text/html" pageEncoding="UTF-8"%>  
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<jsp:include page="header.jsp"/>   

<jsp:include page="navMenu.jsp"/> 

    <!-- Titre -->
    <h1> Mes informations </h1>

    <!-- Si la creation echoue -->
    <c:if test="${param['action'] == 'todo' || param['action'] == 'echec'}"> 
        <span class='alert alert-danger'>${param['message']}</span>
        <br/><br/>
    </c:if>
    
    <!-- Si la creation reussie -->
    <c:if test="${param['action'] == 'succes'}"> 
        <span class='bg-success'>${param['message']}</span>
        <br/><br/>
    </c:if>
    
    <!-- Formulaire de l'utilisateur -->
    <form class="form-horizontal centered" role="form" action="modifierUtilisateur" method="post" >
        
        <!-- Le login de l'utilisateur -->
        <div class="form-group">
            <label for="inputLogin" class="col-sm-2 control-label">Login : </label>
            <div class="col-sm-4">
                <input type="text" name="login" class="form-control" id="inputLogin" placeholder="Login" value="${requestScope['loginUtilisateur']}">
            </div>
        </div>
        
        <!-- Le mot de passe de l'utilisateur -->
        <div class="form-group">
            <label for="inputPassword" class="col-sm-2 control-label">Mot de passe : </label>
            <div class="col-sm-4">
                <input type="password" name="mdp" class="form-control" id="inputPassword" placeholder="Mot de passe" value="${requestScope['mdpUtilisateur']}">
            </div>
        </div>
            
        <!-- Le mail de l'utilisateur -->
        <div class="form-group">
            <label for="inputMail" class="col-sm-2 control-label">Mail : </label>
            <div class="col-sm-4">
                <input type="text" name="mail" class="form-control" id="inputMail" placeholder="Mail" value="${requestScope['mailUtilisateur']}">
            </div>
        </div>
        
        <!-- Le nom de l'utilisateur -->
        <div class="form-group">
            <label for="inputNom" class="col-sm-2 control-label">Nom : </label>
            <div class="col-sm-4">
                <input type="text" name="nom" class="form-control" id="inputLogin" placeholder="Nom" value="${requestScope['nomUtilisateur']}">
            </div>
        </div>
        
        <!-- Le prenom de l'utilisateur -->
        <div class="form-group">
            <label for="inputPrenom" class="col-sm-2 control-label">Prenom : </label>
            <div class="col-sm-4">
                <input type="text" name="prenom" class="form-control" id="inputLogin" placeholder="Prenom"value="${requestScope['prenomUtilisateur']}">
            </div>
        </div>
        
        <!-- Le button d'envoi -->
        <input type="hidden" name="action" value="modifierInfosUtilisateur"/>  
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" name="submit" class="btn btn-success">Confirmer la modification</button>
            </div>
        </div>
        
    </form>


<jsp:include page="footer.jsp"/>   